﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FWMS.Service
{
    class Rukuguanli_yuancailiaoService
    {
        //材料全部查询
        public Bean.Rukuguanli_yuancailiaoBean rukuguanli_ServiceSelect()
        {
            DAO.Rukuguanli_yuancailiaoDao yuancailiaodao = new DAO.Rukuguanli_yuancailiaoDao();
            return yuancailiaodao.rukuguanli_yuancailiaoDaoSelect();
        }
        //原材料入库条件查询
        public Bean.Rukuguanli_yuancailiaoBean rukuguanli_yuancailiaoServiceSelectContation(Bean.Rukuguanli_yuancailiaoBean bean)//存在
        {
            DAO.Rukuguanli_yuancailiaoDao rukuguanlidao = new DAO.Rukuguanli_yuancailiaoDao();
            return rukuguanlidao.rukuguanli_yuancailiaoDaoSelectCondition(bean);
        }
        //原材料入库条件查询 !!库存管理用
        public Bean.Rukuguanli_yuancailiaoBean rukuguanli_yuancailiao_kucunguanliServiceSelectContation(Bean.Rukuguanli_yuancailiaoBean bean)//存在
        {
            DAO.Rukuguanli_yuancailiaoDao rukuguanlidao = new DAO.Rukuguanli_yuancailiaoDao();
            return rukuguanlidao.rukuguanli_yuancailiao_kucunuseDaoSelectCondition(bean);
        }
        //原材料入库添加
        public bool rukuguanli_yuancailiaoServiceAdd(Bean.Rukuguanli_yuancailiaoBean bean)//存在
        {
            DAO.Rukuguanli_yuancailiaoDao rukuguanli_yuancailiaodao = new DAO.Rukuguanli_yuancailiaoDao();
            return rukuguanli_yuancailiaodao.rukuguanli_yuancailiaoDaoAdd(bean);
        }
        //按时间分组查询原料统计库存值
        public Bean.Rukuguanli_yuancailiaoBean rukuguanli_yuancailiaoService_kucunguanliselect_conditionyanshoudate(string nowdate)
        {
            DAO.Rukuguanli_yuancailiaoDao rukuguanli_yuancailiaodao = new DAO.Rukuguanli_yuancailiaoDao();
            return rukuguanli_yuancailiaodao.rukuguanli_yuancailiao_kucunguanli_selectcondition_yanshoudate(nowdate);
        }
        //获取库存最大时间
        public string  rukuguanli_getkucunmaxdate(string type)
        {
            DAO.Rukuguanli_yuancailiaoDao rukuguanli_yuancailiaodao = new DAO.Rukuguanli_yuancailiaoDao();
            return rukuguanli_yuancailiaodao.rukuguanli_selectmaxkucundate(type);
        }
        //原料入库库存添加
        public bool rukuguanli_yuanliaokucundatechuliadd(Bean.Rukuguanli_yuancailiaoBean bean)//存在
        {
            DAO.Rukuguanli_yuancailiaoDao ruku_chanpin_dao = new DAO.Rukuguanli_yuancailiaoDao();
            return ruku_chanpin_dao.kucunguanli_insertormodifyadd(bean);
        }
        //原料入库库存 减
        public bool rukuguanli_yuanliaokucundatechulijian(Bean.Rukuguanli_yuancailiaoBean bean)//存在
        {
            DAO.Rukuguanli_yuancailiaoDao ruku_chanpin_dao = new DAO.Rukuguanli_yuancailiaoDao();
            return ruku_chanpin_dao.kucunguanli_insertormodifyjian(bean);
        }
    }
}
